{
 "metadata": {
  "name": "ABCtests"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## ABC"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import pymc as pm"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "obs = np.array([0, 0, 1])\n",
      "\n",
      "uni = pm.Uniform(\"prop\", 0, 1)\n",
      "fake_obs = pm.Bernoulli(\"fake_obs\", uni, size=3)\n",
      "\n",
      "\n",
      "@pm.deterministic\n",
      "def accept(uni=uni, fake_obs=fake_obs, obs=obs):\n",
      "    if np.array_equal(fake_obs, obs):\n",
      "        return uni\n",
      "    else:\n",
      "        return None"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 132
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "mcmc = pm.MCMC([uni, fake_obs, accept])"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 133
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "mcmc.sample(10000)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " \r",
        "[****************100%******************]  10000 of 10000 complete"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n"
       ]
      }
     ],
     "prompt_number": 134
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "samples = mcmc.trace('accept')[:]"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 135
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "hist(samples[samples > 0])"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "pyout",
       "prompt_number": 136,
       "text": [
        "(array([  47.,  118.,  158.,  125.,  141.,   95.,   74.,   48.,   33.,   10.]),\n",
        " array([ 0.01977077,  0.11150485,  0.20323893,  0.29497301,  0.38670709,\n",
        "        0.47844116,  0.57017524,  0.66190932,  0.7536434 ,  0.84537748,\n",
        "        0.93711155]),\n",
        " <a list of 10 Patch objects>)"
       ]
      },
      {
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHxxJREFUeJzt3X90U/X9P/Bnaov6FagUJbU/YpG2K5EQ6JSKg2ENybA7\nYI+6HsvO7OjGdtbjNnUH7bo/EM+ZzeR4HNOxs+MUO1wBz7ZDezbsB1pAF7UWrUAOBUtrO/uLCJZS\nkUmh3O8f2Lys1JLkJnnH2+fjv5smeb/7JH2SvHrTmDRN00BERIYUp3oDREQUOSx5IiIDY8kTERkY\nS56IyMBY8kREBsaSJyIysHFLvrS0FGazGTabbdTlzz77LGbPno05c+bgscce819eWVmJrKws5OTk\nYOfOnZHZMRERBSx+vC+uWrUKP//5z/HAAw/4L9uzZw9qa2tx8OBBJCQk4Pjx4wCAlpYWbNu2DS0t\nLejp6cHSpUvR2tqKuDi+WCAiUmXcBl68eDGmTZs26rI//elP+PWvf42EhAQAwPXXXw8AqKmpQXFx\nMRISEpCRkYHMzEw0NTVFaNtERBSIoJ9mHz16FK+//jpuu+023HHHHXjnnXcAAL29vUhLS/NfLy0t\nDT09PeHbKRERBW3ccc1Yzp8/j5MnT6KxsRH79u1DUVERPvjggzGvazKZdG+QiIhCF3TJp6Wl4Z57\n7gEA3HrrrYiLi8OJEyeQmpqKrq4u//W6u7uRmpp6ye2rq6thNpt1bJmIaOI5ffo07r777qBvF3TJ\nFxYWYvfu3ViyZAlaW1sxNDSE6667DitWrMDKlSvxyCOPoKenB0ePHsWCBQsuub3ZbEZubm7QGzUi\nt9uN8vJy1duICcxCMAvBLERzc3NItxu35IuLi/Haa6/h448/Rnp6Op544gmUlpaitLQUNp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vEaaG9G5Jn8V70p6s9//jMA4Kc//SkKCgqwY8cOZGZm\n4pprrsGmTZsisRXlAsniiSeewMmTJ/1z6ISEBDQ1NancdkQEksVEEUgWOTk5WLZsGebOnYu4uDis\nXr0aVqtV8c7DL5AsKioqsGrVKtjtdly4cAFPPfUUkpKSFO88/IqLi/Haa6/hxIkTSE9Px7p163Du\n3DkAofcm3wxFRGRg/Pg/IiIDY8kTERkYS56IyMBY8kREBsaSJyIyMJY8EZGBseSJiAyMJU9EZGD/\nH24GAWo9QhTkAAAAAElFTkSuQmCC\n"
      }
     ],
     "prompt_number": 136
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "samples[:1000]"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "pyout",
       "prompt_number": 104,
       "text": [
        "array([None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       0.641398409499, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, 0.346642876027, None, None, 0.307153130839,\n",
        "       None, None, None, None, None, None, None, None, None, 0.14974390582,\n",
        "       None, None, 0.760792945516, None, None, None, None, 0.273355388346,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, 0.762049281736, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, 0.386238065957, None,\n",
        "       0.474620548494, None, None, None, None, None, None, None,\n",
        "       0.233549246555, None, None, None, None, None, None, None,\n",
        "       0.25702449777, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, 0.219752257765, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None,\n",
        "       0.30753209596, None, None, None, None, None, None, None,\n",
        "       0.604963812539, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, 0.600129961666, None, None, None, 0.423292896498,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, 0.416366401192, None, None, None, None,\n",
        "       None, None, None, 0.206467531249, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None,\n",
        "       0.827333806075, 0.367881810314, None, None, None, 0.463397296568,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       0.210841925823, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, 0.540566216778, None, None, 0.448174456742,\n",
        "       None, 0.392659849708, 0.210200730086, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, 0.583595071636, None, None,\n",
        "       None, None, None, None, None, None, None, 0.263724512974, None,\n",
        "       None, None, None, None, None, None, None, 0.310354018644, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, 0.707879317692, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, 0.274577981416, None, None, None, None, None,\n",
        "       0.632703271583, None, None, None, None, None, None, None, None,\n",
        "       0.244699027015, None, None, 0.703190955046, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, 0.339908119414, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None,\n",
        "       0.451298757871, None, None, 0.653381413287, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, 0.602144732268,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, 0.445724522823, None, None,\n",
        "       None, None, None, None, None, 0.315490930854, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None,\n",
        "       0.318855322497, None, None, None, 0.717182055351, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, 0.670501111935, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, 0.363765665679, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, 0.305447088556, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None,\n",
        "       0.282125872166, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, 0.251070061765, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       0.50442411879, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, 0.641889799058, None, None, None, 0.178913518161, None, None,\n",
        "       None, None, None, None, 0.194966290843, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, 0.59455012334, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, 0.153238190081, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, 0.500331587088, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None,\n",
        "       0.443738792346, None, None, None, None, None, 0.530030253902, None,\n",
        "       None, None, None, None, None, None, None, None, None,\n",
        "       0.372842415902, None, None, None, None, None, None, 0.690298120711,\n",
        "       None, None, 0.750438143415, None, None, 0.280714706648, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, 0.350938621096, None, None,\n",
        "       None, None, None, None, None, 0.714571072204, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, 0.897063779285, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None,\n",
        "       0.319977971294, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, 0.141266113341, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, None, None, None, None, None, None, None, None, None,\n",
        "       None, None, 0.0703177567736, None, None, None, None, None, None], dtype=object)"
       ]
      }
     ],
     "prompt_number": 104
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}